-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add @useSystemTextJsonConverter
decorator for csharp
#1230
Conversation
All changed packages have been documented.
Show changes
|
You can try these changes here
|
@hasJSONConverter
decorator@hasJSONConverter
decorator for csharp
Given the timeline: Azure/autorest.csharp#3469 (comment), we would like to get this out in the next release. |
packages/typespec-client-generator-core/test/types/general-decorators-list.test.ts
Show resolved
Hide resolved
@hasJSONConverter
decorator for csharp@hasJsonConverter
decorator for csharp
- "@azure-tools/typespec-client-generator-core" | ||
--- | ||
|
||
Add `@hasJsonConverter` for csharp only to indicate if JSON converter is needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets rename to @useSystemTextJsonConverter to make it more explicit what this is used for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll say it feels quite weird having this at the root of Tcgc namespace with this name that is very csharp specific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is indeed csharp specific only decorator.
@timotheeguerin Are you implying we should keep it within csharp sub-namespace if we ensure it will not be used for other languages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah just feels like this is not super compatible with the new approach of using a shared name and scope.
But if you feel like it's best then I'm not blocking or anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have decided that language-specific decorators will go in the main namespace because of grow-up, but they will have to specify the scope, and we have an issue to have linter warnings if a decorator is applied to emitters that won't do anything with it.
My question with this PR is more: I thought we had decided that there was a use case for Java here too, and that there was going to be a redesign of this decorator (most likely just a rename), that would make it compatible with Java's scenario as well
@hasJsonConverter
decorator for csharp@useSystemTextJsonConverter
decorator for csharp
516c321
to
1fd1583
Compare
merge to august release branch instead in #1336 |
#1229